#ifndef __DRV_RECODER_H
#define __DRV_RECODER_H
//GD32F103CBT6 128KB
//GD32F303CBT6 128KB
#include "stdint.h"
#include "DRV_CALIB.H"
#define RECODE_FLASH_ADD 				((uint32_t)0x08000000U)+(110*1024)
#define HAVE_RECODER_ADD				(((uint32_t)0x08000000U)+(110*1024)+0*1024)
#define DEVICE_FLASH_ADD				(((uint32_t)0x08000000U)+(110*1024)+1*1024)
#define SENSOR_FLASH_ADD(X)			(RECODE_FLASH_ADD+(X)*1024+2*1024)
//(((uint32_t)0x08000000U)+(119*1024))
void drv_recoder_write_buf(uint32_t addr,_sensor_t *t);

void drv_recoder_read_buf(uint32_t addr,_sensor_t *t);

void drv_recoder_write_device_buf(uint32_t addr,_device_t *t);
void drv_recoder_read_device_buf(uint32_t addr,_device_t *t);

void drv_have_recoder_init_buf(void);
void drv_have_recoder_write_buf(void);
uint8_t drv_have_recoder_read_buf(void);
#endif